package com.minimalist.common.entity.basic.vo.file;

import com.minimalist.common.config.mybatis.bo.PageReq;
import com.minimalist.common.config.swagger.SchemaEnum;
import com.minimalist.common.entity.basic.enums.StatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serial;
import java.io.Serializable;

/**
 * @author 11987
 */
@Schema(name = "文件查询实体")
public class FileQueryVO extends PageReq implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(name = "fileName", description = "文件名", type = "string")
    private String fileName;

    @Schema(name = "fileSource", description = "文件来源", type = "string")
    private Integer fileSource;

    @Schema(name = "fileType", description = "文件类型，由字典配置，与file表file_type字段对应", type = "string")
    private String fileType;

    @SchemaEnum(implementation = StatusEnum.class)
    @Schema(name = "status", description = "文件状态", type = "int")
    private Integer status;

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public Integer getFileSource() {
        return fileSource;
    }

    public void setFileSource(Integer fileSource) {
        this.fileSource = fileSource;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        FileQueryVO that = (FileQueryVO) o;
        return java.util.Objects.equals(fileName, that.fileName) &&
               java.util.Objects.equals(fileSource, that.fileSource) &&
               java.util.Objects.equals(fileType, that.fileType) &&
               java.util.Objects.equals(status, that.status);
    }

    @Override
    public int hashCode() {
        return java.util.Objects.hash(super.hashCode(), fileName, fileSource, fileType, status);
    }

    @Override
    public String toString() {
        return "FileQueryVO{" +
               "fileName='" + fileName + '\'' +
               ", fileSource=" + fileSource +
               ", fileType='" + fileType + '\'' +
               ", status=" + status +
               "} " + super.toString();
    }

}
